package com.ys.erp.stage_emp_service.controller;

/**
 * @author 南山
 * @date 2025/08/08 14:35
 */

import com.ys.erp.framework.annotation.CheckEmpLogin;
import com.ys.erp.framework.annotation.ResponseResult;
import com.ys.erp.framework.annotation.StageLoginEmp;
import com.ys.erp.framework.bean.dto.StageEmpDTO;
import com.ys.erp.stage_emp_service.bean.vo.RightVO;
import com.ys.erp.stage_emp_service.service.RoleService;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@ResponseResult
@RestController
@RequiredArgsConstructor
@RequestMapping("/manage/emp/role/")
@Tag(name = "角色相关接口", description = "角色相关接口")
public class RoleController {

    private final RoleService roleService;
    @RequestMapping("getRoleListByType")
    @Operation(summary = "获取角色列表", description = "获取角色列表")
    @CheckEmpLogin
    public List<RightVO> getRoleListByType(@StageLoginEmp StageEmpDTO empDto, @RequestParam(value = "type") String type) {
        return roleService.getRoleListByType(empDto, type);
    }


}
